package com.kbt.adapter;

import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import com.kbt.model.data.AddressBean;
import com.kbt.model.data.OrderBean;
import com.kbt.model.data.OrderInfoModel;

import java.util.List;

/**
 * @author zhgk
 * @package: com.kbt.adapter
 * @TODO: <请描述这个类是干什么的>
 * @data: 2015/8/19 17:10
 * @version: V1.0
 */
public class OrderBaseAdapter extends BaseAdapter {
    protected Activity context;
    protected List<OrderBean> orderList;

    public OrderBaseAdapter(Activity context, List<OrderBean> orderList) {
        this.context = context;
        this.orderList = orderList;
    }


    @Override
    public int getCount() {
        return orderList.size();
    }

    @Override
    public Object getItem(int position) {
        return orderList.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        return convertView;
    }
    /**
     * 再次赋值
     *
     * @param mlist
     */
    public void setList(List<OrderBean> mlist) {
        orderList = mlist;
    }

}
